package com.tc.quartz.frame.base;

import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import java.io.Serializable;

/**
 * baseModel基类
 * @author yongjin.ye
 *
 */
public abstract class BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

	
	/**
	 * toJson
	 */
	public String toJson() {
		return JSON.toJSONString(this);
	}

	
	/**
	 * 重写toString
	 */
	@Override
	public String toString() {
		return String.format("%s, %s", super.toString(), new ReflectionToStringBuilder(this).toString());
	}

}